Skip to content

refactor: establish semantic token layer (UI parity round 1) - #27

Merged
s-annam merged 1 commit into
mainfrom
gh-23
Jun 9, 2026
Merged

refactor: establish semantic token layer (UI parity round 1)#27
s-annam merged 1 commit into
mainfrom
gh-23

Conversation

@s-annam

@s-annam s-annam commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Round 1 of the UI-parity epic (#22). Ports the design-token substrate from Recruidea so feature code has real semantic classes instead of raw Tailwind palette values.

  • styles.css — light + dark --color-* CSS custom properties in :root / @media (prefers-color-scheme: dark); body now uses bg-surface-base + text-content-primary (var swap drives dark mode, no more dark: body override)
  • tailwind.config.jstheme.extend.colors with brand / surface / content / border / accent / feedback groups mapped to the CSS vars (names match Recruidea exactly)
  • DropZone / PdfPreview / Result — every raw palette class replaced with the semantic equivalent; redundant dark: variants removed
  • CLAUDE.md — Styling & Tokens vocab reconciled with the shipped config

Substrate swap only — net visual change ~neutral, no redesign. src/App.tsx still carries raw palette classes (out of scope this round).

Closes #23

Test plan

  • grep -rE "(bg|text|border|from|to)-(neutral|gray|slate|red|amber|green|orange|zinc|stone|emerald)-[0-9]" src/components returns nothing
  • npm run typecheck clean
  • npm run build green
  • Manually verified light + dark render (landing + Result card) via Playwright — body var swap + feedback pills correct in both schemes, no regression

Port the design-token substrate from Recruidea so feature code has
real semantic classes instead of raw Tailwind palette values.

- styles.css: define light + dark --color-* CSS custom properties in
  :root / @media (prefers-color-scheme: dark); body now uses
  bg-surface-base and text-content-primary (var swap handles dark,
  no more dark: body override)
- tailwind.config.js: extend colors with brand / surface / content /
  border / accent / feedback token groups mapped to the CSS vars
- DropZone, PdfPreview, Result: replace every raw palette class
  (neutral-*, emerald-*, amber-*, red-*) with the semantic equivalent;
  remove now-redundant dark: variants
- CLAUDE.md: update Styling & Tokens examples to match shipped vocab

src/App.tsx still carries raw palette classes — out of scope this round.

Resolves #23
@s-annam
s-annam requested review from Samhit21 and Vaishnavi1709 June 9, 2026 17:59

@Vaishnavi1709 Vaishnavi1709 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: refactor: establish semantic token layer (UI parity round 1)

Summary

Clean substrate swap. Issue #23's full acceptance set is met: light + dark --color-* vars in :root, Tailwind mapping with semantic names that match Recruidea verbatim, in-scope components migrated with dark: pairs collapsed, CLAUDE.md vocab reconciled with the shipped config. CI green. No required changes.

Spec Alignment (issue #23)

Criterion Status Notes
Light + dark --color-* palette in styles.css :root + @media (prefers-color-scheme: dark), brand/surface/content/border/accent/feedback groups
theme.extend.colors semantic mapping names match Recruidea exactly per the #22 decision
src/components/{DropZone,PdfPreview,Result}.tsx migrated acceptance grep returns nothing under src/components
dark: variants removed all collapsed; body var-swap drives dark mode
CLAUDE.md vocab matches shipped config bg-surface/text-ink/text-brand-primarybg-surface-card/text-content-primary/text-brand-amber
npm run typecheck + npm run build clean CI verify job green
Manual light + dark check Playwright, per PR body

Highlights

  • Scope discipline. src/App.tsx (header alpha pill, intro copy, error banner, footer) is explicitly carved out and called out in the PR body — keeps this round small and the reuse-surface hook still guards against new drift while App.tsx waits its turn.
  • Doc reconciliation in the same PR. Avoids the trap of shipping tokens but leaving CLAUDE.md naming bg-surface/text-ink for the next contributor to be confused by.
  • Test-plan grep is stricter than the issue's. Adds emerald to the disallowed set — StatusPill/CheckPill used emerald-100/900 and would have slipped past the issue's exact regex.

Key Findings

None blocking.

Verdict

Action: APPROVE
Rationale: Issue #23 acceptance criteria are all hit; the token layer is correctly named, correctly wired, and correctly applied to the in-scope components. CI green, scope carve-out for App.tsx explicit, doc and config land in lockstep.

@s-annam
s-annam merged commit 96cbcc8 into main Jun 9, 2026
1 check passed
@s-annam
s-annam deleted the gh-23 branch June 9, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Establish the semantic token layer (UI parity round 1)

2 participants